﻿Partial Public Class DetailPage

    Private Shared _Count As Integer = 0
    Private _Index As Integer
    Public Sub New()
        _Count += 1
        _Index = _Count
        Debug.Print("{0} {1} Constructed", Me.GetType.Name, _Index)
        InitializeComponent()
    End Sub
    Protected Overrides Sub Finalize()
        Debug.Print("{0} {1} Finalized", Me.GetType.Name, _Index)
        MyBase.Finalize()
    End Sub

    Private Sub Page_Initialized(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Initialized
        Debug.Print("{0} {1} Initialized", Me.GetType.Name, _Index)
    End Sub

    Private Sub Page_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) Handles Me.Loaded
        Debug.Print("{0} {1} Loaded", Me.GetType.Name, _Index)
    End Sub

    Private Sub Page_Unloaded(ByVal sender As Object, ByVal e As RoutedEventArgs) Handles Me.Unloaded
        Debug.Print("{0} {1} Unloaded", Me.GetType.Name, _Index)
    End Sub
End Class
